package com.dubbo.consumer.controller;

import com.dubbo.user.api.IUserFacade;
import com.dubbo.user.dto.request.UserAddRequest;
import com.dubbo.user.dto.response.UserAddResponse;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dongdingzhuo
 * @description 测试
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @DubboReference(version = "1.0.1")
    private IUserFacade userFacade;

    @PostMapping("/t1")
    public UserAddResponse test1(@RequestBody UserAddRequest request) {
        return userFacade.userAdd(request);
    }

}
